package net.sudot.chess.business.dao;

import net.sudot.chess.business.model.SystemConfig;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 系统配置
 *
 * @author tangjialin on 2018-03-26.
 */
@Repository
public class SystemConfigDao extends BaseDao<SystemConfig> {

    @Override
    public List<SystemConfig> findAll() {
        String hql = "SELECT _table FROM " + entityClass.getName()
                + " AS _table ORDER BY _table.attributeKey ASC";
        return entityManager.createQuery(hql, entityClass).getResultList();
    }
}
